"""
2.语法
    'document.getElementById("id属性值").style.display="none";'
    'document.getElementById("id属性值").style.visibility = "hidden";
"""

# 1.导包
import os
from time import sleep
from selenium import webdriver

# 2.创建浏览器驱动, 并打开浏览器
driver = webdriver.Chrome()
driver.maximize_window()
driver.get("https://www.itsource.cn/")

# 3.元素定位+元素操作
sleep(10)

# 3.1 准备JS语句
JS = 'document.getElementById("div_company_mini").style.visibility = "hidden";'
driver.execute_script(JS)

# 4.关闭浏览器
sleep(5)
driver.quit()